<section class="content-header">
	<h1>
		{{title}}<small></small>
	</h1>
</section>
<section class="content">
	<div class="box box-default">
		<div class="col-md-12">
			<div class="box-body" ng-controller="articlecategory">
				<alertdanger></alertdanger>
				<alertsuccess></alertsuccess>
				<form role="form">
					<div class="box-body">
						<div class="form-group">
							<label> <input type="radio" ng-change="gradechange();"
								ng-model="grade" ng-value="0" class="flat-red" ng-checked="true">
								一级分类
							</label> <label> <input type="radio" ng-change="gradechange();"
								ng-model="grade" ng-value="1" class="flat-red"> 二级分类
							</label>
						</div>
						<div ng-show="ltypeidcategoryshow" class="form-group"
							ng-init="findallnavcategoryt();">
							<label>选择一级分类</label> <select 
								ng-model="navall" ng-options="gs.articleCategoryTid as gs.name for gs in navalls"
								class="form-control select2" style="width: 100%;">
								<option ng－value="-1">--请选择--</option>
							</select>
						</div>
						<div class="form-group">
							<label>分类名称</label> <input maxlength="20" required="required"
								ng-model="name" class="form-control" type="text"
								placeholder="请输入分类名称" value="">
						</div>
						<div class="form-group">
							<label>关键字</label> <input maxlength="20" required="required"
								ng-model="metakeywords" class="form-control" type="text"
								placeholder="请输入关键字" value="">
						</div>
						<div class="form-group">
							<label>描述</label> <input maxlength="20" required="required"
								ng-model="metadec" class="form-control" type="text"
								placeholder="请输入描述" value="">
						</div>
						<div class="form-group">
							<label>排序</label> <input maxlength="20" required="required"
								ng-model="sort" class="form-control" type="text"
								placeholder="请输入数字" value="">
						</div>
						<div class="form-group">
							<label>静态路径</label> <input maxlength="20" required="required"
								ng-model="htmlpath" class="form-control" type="text"
								placeholder="请输入静态路径" value="">
						</div>
						<div class="form-group">
							<label>显示位置</label>
							<div class="control">
								<label> <input type="radio" ng-model="position"
									ng-value="1" class="flat-red" ng-checked="true"> 在页脚显示
								</label> <label> <input type="radio" ng-model="position"
									ng-value="0" class="flat-red"> 不在页脚显示
								</label>
							</div>
						</div>
						
						<div class="form-group">
							<label>同步移动平台标记</label>
							<div class="control">
								<label> <input type="radio" ng-model="mobilesync"
									ng-value="1" class="flat-red" ng-checked="true"> 同步
								</label> <label> <input type="radio" ng-model="mobilesync"
									ng-value="0" class="flat-red"> 不同步
								</label>
							</div>
						</div>
						<div class="form-group">
							<label>上传图标</label>
							<div ngf-drop ngf-select ng-model="files" class="drop-box"
								ngf-drag-over-class="'dragover'" ngf-multiple="true"
								ngf-allow-dir="true" accept="image/*" ngf-pattern="'image/*'">
								<button class="btn btn-default btn-block btn-sm">选择文件</button>
								<div ngf-no-file-drop>File Drag/Drop is not supported for
									this browser</div>
							</div>
							<div class='box-body'>
								<div class="progress progress-sm active">
									<div
										class="progress-bar progress-bar-success progress-bar-striped"
										role="progressbar" aria-valuenow="0" aria-valuemin="0"
										aria-valuemax="100" style="width: {{progress}}%">
										<span class="sr-only">20% Complete</span>
									</div>
								</div>
								<div ng-repeat="img in allupimgs">
									<div ng-if="img.isCloudImg">
										<div class="alert alert-success alert-dismissable">
											<button ng-click="remove($index)" type="button" class="close"
												data-dismiss="alert" aria-hidden="true">&times;</button>

											<img class="img-responsive pad"
												ng-src="{{img.normalfilepath}}" alt="Photo"> <img
												class="img-responsive pad" ng-src="{{img.compressfilepath}}"
												alt="Photo">

										</div>
									</div>
									<div ng-if="!img.isCloudImg">
										<div class="alert alert-success alert-dismissable">
											<button ng-click="remove($index)" type="button" class="close"
												data-dismiss="alert" aria-hidden="true">&times;</button>

											<img class="img-responsive pad"
												ng-src="{{img.basepath+img.normalfilepath}}" alt="Photo">

											<img class="img-responsive pad"
												ng-src="{{img.basepath+img.compressfilepath}}" alt="Photo">

										</div>
									</div>
								</div>

							</div>
						</div>
						<div class="form-group">
							<label> <input type="radio" ng-model="mobilesync"
								ng-value="1" class="flat-red" ng-checked="true"> 启用
							</label> <label> <input type="radio" ng-model="mobilesync"
								ng-value="0" class="flat-red"> 禁用
							</label>

						</div>
					</div>
					<div class="box-footer">
						<button ng-show="savebtn.show" type="button"
							class="btn btn-primary" ng-click="save();">保存</button>
						<button ng-show="updatebtn.show" type="button"
							class="btn btn-primary" ng-click="update();">更新</button>
					</div>
				</form>
			</div>
		</div>
		<div class="box-footer"></div>
	</div>
</section>
<script>
$(function(){
	$(".select2").select2();
});
</script>